//
//  ListTableViewCell.m
//  众筹
//
//  Created by longmen2 on 16/3/10.
//  Copyright © 2016年 gengsensen. All rights reserved.
//

#import "ChangeTableViewCell.h"

@implementation ChangeTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        UIImageView * bigView = [[UIImageView alloc]init];
        [self.contentView addSubview:bigView];
        bigView.backgroundColor = [UIColor redColor];
        
        [bigView mas_makeConstraints:^(MASConstraintMaker *make) {
           
            make.left.equalTo(self.contentView.left);
            make.top.equalTo(self.contentView.top);
            make.right.equalTo(self.contentView.right);
            make.height.equalTo(100);
            
        }];
        
        
        UILabel * imageLabel = [[UILabel alloc]init];
        imageLabel.text = @"sssss";
        
        imageLabel.textAlignment = NSTextAlignmentCenter;
        
        [self.contentView addSubview:imageLabel];
        
        [imageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.left);
            make.top.equalTo(bigView.bottom).offset(10);
            make.right.equalTo(self.contentView.right);
            make.height.equalTo(20);
            
        }];
        
        
        UIImageView * FenGeView = [[UIImageView alloc]init];
        [self.contentView addSubview:FenGeView];
        FenGeView.backgroundColor = [UIColor redColor];
        
        FenGeView.backgroundColor = [UIColor blueColor];
        
        [FenGeView mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self.contentView.left).offset(20);
            make.top.equalTo(imageLabel.bottom).offset(10);
            make.right.equalTo(self.contentView.right).offset(-20);
            make.height.equalTo(4);
            
        }];
        
        
        
        for (int i =0; i<3; i++) {
            
            UILabel  * label  = [[UILabel alloc]init];
            
            [self.contentView addSubview:label];
            label.text = @"137%100";
            label.textAlignment = NSTextAlignmentCenter;
            
            
            label.backgroundColor = [UIColor orangeColor];
            
            [label mas_makeConstraints:^(MASConstraintMaker *make) {
               
                make.left.equalTo(self.contentView.left).offset(30+120*i);
                
                make.top.equalTo(FenGeView.bottom).offset(20);
                make.height.equalTo(30);
                make.width.equalTo(120);
                
            }];
            
            UILabel  * labelbotttom  = [[UILabel alloc]init];
            
            [self.contentView addSubview:labelbotttom];
            labelbotttom.text = @"完成";
            labelbotttom.textAlignment = NSTextAlignmentCenter;
            
            
            labelbotttom.backgroundColor = [UIColor orangeColor];
            
            [labelbotttom mas_makeConstraints:^(MASConstraintMaker *make) {
                
                make.left.equalTo(self.contentView.left).offset(30+120*i);
                
                make.top.equalTo(label.bottom).offset(20);
                make.height.equalTo(30);
                make.width.equalTo(120);
                
            }];

            
            
            
            
        }
        

        
        
        
        
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
